<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"+"user/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>注册</title>
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
	<meta name="keywords" content="fly,layui,前端社区">
	<meta name="description" content="Fly社区是模块化前端UI框架Layui的官网社区，致力于为web开发提供强劲动力">
	<link rel="stylesheet" href="../res/layui/css/layui.css">
	<link rel="stylesheet" href="../res/css/global.css">
	<script src="../res/layui/layui.js"></script>
  </head>
	
	<body>
	
		<div class="header">
			<div class="main">
				<a class="logo" href="../index.jsp" title="Fly">Fly社区</a>
				<div class="nav">
					<a class="nav-this" href="../index.jsp">
						<i class="iconfont icon-wenda"></i>问答
					</a>
				</div>
	
				<!-- <div class="nav-user">
					登入后的状态
	
					<a class="avatar" href="home.html">
						<img src="../res/images/avatar/11.jpg">
						<cite>贤心</cite>
						<i>VIP</i>
					</a>
					<div class="nav">
						<a href="set.html"><i class="iconfont icon-shezhi"></i>设置</a>
						<a href="login.html"><i class="iconfont icon-tuichu" style="top: 0; font-size: 22px;"></i>退了</a>
					</div>
	
				</div> -->
			</div>
		</div>
	
		<div class="main layui-clear">
			<div class="fly-panel fly-panel-user" pad20>
				<div class="layui-tab layui-tab-brief">
					<ul class="layui-tab-title">
						<li><a href="login.jsp">登入</a></li>
						<li class="layui-this">注册</li>
					</ul>
					<div class="layui-form layui-tab-content" id="LAY_ucm" style="padding: 20px 0;">
						<div class="layui-tab-item layui-show">
							<div class="layui-form layui-form-pane">
								<!-- 表单 -->
								<form action="register" method="post">
									<div class="layui-form-item">
										<label for="L_email" class="layui-form-label">邮箱</label>
										<div class="layui-input-inline">
											<input type="text" lay-verify="email" autocomplete="off" class="layui-input"
												name="userEmail">
										</div>
										<div id="msg" class="layui-form-mid layui-word-aux">将会成为您唯一的登入名</div>
									</div>
									<div class="layui-form-item">
										<label for="L_username" class="layui-form-label">昵称</label>
										<div class="layui-input-inline">
											<input type="text" lay-verify="required" autocomplete="off"
												class="layui-input" name="userName">
										</div>
									</div>
									<div class="layui-form-item">
										<label for="L_pass" class="layui-form-label">密码</label>
										<div class="layui-input-inline">
											<input type="password" lay-verify="pass" autocomplete="off" class="layui-input"
												name="userPwd">
										</div>
										<div class="layui-form-mid layui-word-aux">6到16个字符</div>
									</div>
									<div class="layui-form-item">
										<label for="L_sex" class="layui-form-label">性别</label>
										<div class="layui-input-inline">
											<input type="radio" title="男" value="男" checked="checked" name="userSex">
											<input type="radio" title="女" value="女" name="userSex">
										</div>
									</div>
									<div class="layui-form-item">
										<label for="L_vercode" class="layui-form-label">人类验证</label>
										<div class="layui-input-inline">
											<input type="text" lay-verify="required" placeholder="请回答后面的问题"
												autocomplete="off" class="layui-input" id="code" name="code">
										</div>
										<div class="layui-form-mid">
											<!-- <span style="color: #c00;">5*8=?</span> -->
										</div>
										<div>
											<!-- 这里图片的src已经不是一个固定图片地址，而是一个jsp文件 -->
											<img src="ImageJsp.jsp" id="imgs" title="tupian" alt="tupian" width="60px" height="20px" /> &nbsp; &nbsp; <a
												href="javascript:f_change()">换图片</a>
											<script>
												function f_change() {
													//使用存的js获得img对象，使用jquery框架的 $(),好像不管用
													var img = document.getElementById("imgs");
													img.src = "ImageJsp.jsp?id=" + new Date().getTime();//通过id值的不同，让服务器不是缓存中的图片流，生成一个新的图片流
												}
											</script>
										</div>
									</div>
									<div class="layui-form-item">
										<input class="layui-btn" type="submit" value="注册" />
									</div>
								</form>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	
		<div class="footer">
			<p><a href="#">网博社区</a> 2017 &copy; <a href="#/">njwangbo.com</a></p>
			<p>
				<a href="#" target="_blank">产品授权</a>
				<a href="#" target="_blank">网博社区</a>
				<a href="#" target="_blank">微信公众号</a>
			</p>
		</div>
	
		<script>
			layui.use('element', function () {
				var element = layui.element();
			});
		</script>
		<script>

			layui.cache.page = '';
			layui.cache.user = {
				username: '游客'
				, uid: -1
				, avatar: '../res/images/avatar/00.jpg'
				, experience: 83
				, sex: '男'
			};
			layui.config({
				version: "2.0.0"
				, base: '../res/mods/'
			}).extend({
				fly: 'index'
			}).use('fly');
		</script>
	</body>
	
</html>
